//
//  SEusrInfoController.m
//  kuaiyi
//
//  Created by Zhu Jinxin on 16/7/6.
//  Copyright © 2016年 Alphts. All rights reserved.
//

#import "SEusrInfoController.h"
#define ScreenSize [UIScreen mainScreen].bounds.size
@interface SEusrInfoController ()

@property(nonatomic,strong) NSArray *dataArray1;

@end

@implementation SEusrInfoController


- (void)viewDidLoad{
    
    [super viewDidLoad];
    
    self.title = @"我的资料";
    
    _dataArray1 = @[@"姓名:   碇シンジ",@"年龄:   14",@"性别:   男",@"病症:   人格分裂",@"签名:   抚摸狗头",@"银行卡号:   8765374857364859",@"银行卡密码:   111111",];
    
    self.tableView.userInteractionEnabled = NO;
    
    [self setupUI];
    
}

- (void)setupUI{
    
    //背景图片
    UIImageView *BGimagView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"temp2"]];
    [BGimagView setContentMode: UIViewContentModeScaleAspectFit];
    BGimagView.alpha = 0.5;
    [self.tableView setBackgroundView:BGimagView];
    
    //头像
    UIImageView *IconmageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 80 , 80)];
    IconmageView.backgroundColor = [UIColor clearColor];
    IconmageView.image = [UIImage imageNamed:@"shinji"];
    IconmageView.layer.cornerRadius = IconmageView.bounds.size.width/2;
    IconmageView.layer.masksToBounds = YES;
    
    //HeaderView
    UIView *headerView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 0, 100)];
    [headerView addSubview:IconmageView];
    
    self.tableView.tableHeaderView = headerView;
    IconmageView.center = (CGPointMake(ScreenSize.width/2, headerView.bounds.size.height/2));
    
    headerView.backgroundColor = [UIColor clearColor];
    
}



- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return _dataArray1.count;
    
    
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"Cell"];
    
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
    
    cell.backgroundColor = [UIColor clearColor];
    
    cell.textLabel.text = _dataArray1[indexPath.row];
    
    return cell;
    
    
}



//- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
//    
//    [tableView deselectRowAtIndexPath:indexPath animated:NO];
//    
//}

@end
